<?php
/**
 * 2021/8/16 16:19
 */


namespace m;


class AppIndexM extends AppBasicM
{
    use  \Singleton;

    protected $name = "index";

    public function index($where,$page,$limit): array
    {
        $res = $this->where($where)->paginate(['list_rows'=>$limit,'page'=>$page])->toArray();
        return ['pageCount' => $this->pageCount($res['total'],$limit),'list'=>$res['data']];
    }
}